<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/bootstrap.css" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php echo $google_analytics; ?>
<style type="text/css">
.row-fluid{
	margin-top: 10px;		
}
</style>
</head>
<body>
<div id="container" style="margin-top: 10px;">
<div class="row-fluid">
  <?php if ($logo) { ?>
  <div class="row-fluid">
	  <div class="span4 offset3">
	  	<a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a>
	  </div>
  </div>
  <?php } ?>
<div class="row-fluid">
	<div class="navbar">
  		<div class="navbar-inner">
  		  <?php if ($categories) { ?>
		  <ul class="nav">
		  	<li id="home"><a href="<?php echo HTTP_SERVER; ?>"><?php echo $text_home; ?></a></li>
		    <?php foreach ($categories as $key => $category) { ?>
		    <li id="<?php echo $category['keyword']; ?>"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
		      
		    </li>
		    <?php } ?>
		  </ul>
		  <?php } ?>
		</div>
	</div>
</div>
</div>
<script>
function getURLVar() {
	var urlHalves = String(document.location).toLowerCase().split('/');
	
	return urlHalves[urlHalves.length];
} 

$(document).ready(function() {
	var urlHalves = String(document.location).toLowerCase().split('/');
	
	route = urlHalves[urlHalves.length - 1];
	
	if (!route) {
		$('#home').addClass('active');
	} else {
		$('a[href*=\'' + route + '\']').parents('li[id]').addClass('active');
	}
});
</script>
<div id="notification"></div>
